<?
/**
 * Additional functions file
 *
 * Project: LanguageTranslation<br/>
 * File: dev_utils.php
 *
 * @author Quality Solutions
 * @package includions
 */
function dump($var) {
    if (function_exists('debug_backtrace')) {
        $Tmp1 = debug_backtrace();
    }
    else {
        $Tmp1 = array(
            'file' => 'UNKNOWN FILE',
            'line' => 'UNKNOWN LINE',
        );
    }
    echo "<FIELDSET STYLE=\"font:normal 12px helvetica,arial; margin:10px;\"><LEGEND STYLE=\"font:bold 14px helvetica,arial\">Dump - ".$Tmp1[0]['file']." : ".$Tmp1[0]['line']."</LEGEND><PRE>\n";
    print_r($var);
    echo "</PRE></FIELDSET>\n\n";
    flush();
}

function dumpx($var) {
    dump($var);
    exit;
}

function isValidEmail($email) {
        if(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) {
                return true;
        } else {
                return false;
        }
}
?>
